#ifndef RECVTHREAD_H
#define RECVTHREAD_H

#include <QThread>
#include <QSerialPort>
#include "myplaintextedit.h"

class RecvThread : public QThread
{
    Q_OBJECT
public:
    RecvThread(QObject *parent = nullptr);
    ~RecvThread();

public:
    void runStart(QSerialPort *port);
    void runStop();
signals:
    void recvRequest(const QString &text);

private:
    bool m_quit;
    QSerialPort *m_SerialPort;
    void run() override;
};

#endif // RECVTHREAD_H
